﻿'
' DKP for DotNetNuke® - http://dkpdnn.codeplex.com
' Copyright (c) 2008
' by Casey Lengacher ( http://dkpdnn.codeplex.com )
'
' DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation.
'
' Permission is hereby granted, free of charge, to any person obtaining a copy
' of this software and associated documentation files (the "Software"), to deal
' in the Software without restriction, including without limitation the rights
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
' copies of the Software, and to permit persons to whom the Software is
' furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in
' all copies or substantial portions of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
' SOFTWARE.
'

Namespace DotNetNuke.Modules.tss_DKP

    Public MustInherit Class tss_DataProvider

#Region "Shared/Static Methods"

        ' singleton reference to the instantiated object 
        Private Shared objProvider As tss_DataProvider = Nothing

        ' constructor
        Shared Sub New()
            CreateProvider()
        End Sub

        ' dynamically create provider
        Private Shared Sub CreateProvider()
            objProvider = CType(Framework.Reflection.CreateObject("data", "DotNetNuke.Modules.tss_DKP", "DotNetNuke.Modules.tss_DKP"), tss_DataProvider)
        End Sub

        ' return the provider
        Public Shared Shadows Function Instance() As tss_DataProvider
            Return objProvider
        End Function

#End Region

#Region "Board Methods"

        Public MustOverride Function tss_GetBoard(ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetBoards(ByVal PortalID As Integer) As IDataReader
        Public MustOverride Function tss_GetBoardsByPage(ByVal PortalID As Integer, _
                                                         ByVal PageNumber As Integer, _
                                                         ByVal PageSize As Integer, _
                                                         ByVal SortExpression As String, _
                                                         ByVal SortDirection As String, _
                                                         ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteBoard(ByVal BoardID As Integer)
        Public MustOverride Function tss_AddBoard(ByVal BoardName As String, _
                                                  ByVal GameID As Integer, _
                                                  ByVal SystemID As Integer, _
                                                  ByVal GuildName As String, _
                                                  ByVal RegionName As String, _
                                                  ByVal RealmName As String, _
                                                  ByVal GoodAttendanceCutOff As Integer, _
                                                  ByVal BadAttendanceCutOff As Integer, _
                                                  ByVal PlayerSyncCutOff As Integer, _
                                                  ByVal PortalID As Integer) As Integer
        Public MustOverride Sub tss_UpdateBoard(ByVal BoardID As Integer, _
                                                ByVal BoardName As String, _
                                                ByVal GameID As Integer, _
                                                ByVal SystemID As Integer, _
                                                ByVal GuildName As String, _
                                                ByVal RegionName As String, _
                                                ByVal RealmName As String, _
                                                ByVal GoodAttendanceCutOff As Integer, _
                                                ByVal BadAttendanceCutOff As Integer, _
                                                ByVal PlayerSyncCutOff As Integer, _
                                                ByVal PortalID As Integer)

#End Region

#Region "Class Methods"

        Public MustOverride Function tss_GetClasses(ByVal GameID As Integer) As IDataReader

#End Region

#Region "Drop Methods"

        Public MustOverride Function tss_GetDrop(ByVal DropID As Integer) As IDataReader
        Public MustOverride Function tss_GetDropByMobIdItemID(ByVal MobID As Integer, _
                                                              ByVal ItemID As Integer) As IDataReader
        Public MustOverride Function tss_GetDrops(ByVal RaidID As Integer) As IDataReader
        Public MustOverride Function tss_GetDropsByPage(ByVal MobID As Integer, _
                                                              ByVal PageNumber As Integer, _
                                                              ByVal PageSize As Integer, _
                                                              ByVal SortExpression As String, _
                                                              ByVal SortDirection As String, _
                                                              ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteDrop(ByVal DropID As Integer)
        Public MustOverride Function tss_AddDrop(ByVal MobID As Integer, _
                                                 ByVal ItemID As Integer) As Integer
        Public MustOverride Sub tss_UpdateDrop(ByVal DropID As Integer, _
                                               ByVal MobID As Integer, _
                                               ByVal ItemID As Integer)

#End Region

#Region "Games Methods"

        Public MustOverride Function tss_GetGames() As IDataReader

#End Region

#Region "Instance Methods"

        Public MustOverride Function tss_GetInstance(ByVal InstanceID As Integer) As IDataReader
        Public MustOverride Function tss_GetInstanceByName(ByVal InstanceName As String, _
                                                           ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetInstances(ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetInstancesByPage(ByVal BoardID As Integer, _
                                                            ByVal PageNumber As Integer, _
                                                            ByVal PageSize As Integer, _
                                                            ByVal SortExpression As String, _
                                                            ByVal SortDirection As String, _
                                                            ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteInstance(ByVal InstanceID As Integer)
        Public MustOverride Function tss_AddInstance(ByVal InstanceName As String, _
                                                     ByVal InstanceWowHeadID As String, _
                                                     ByVal InstanceHeroicFlag As Boolean, _
                                                     ByVal BoardID As Integer) As Integer
        Public MustOverride Sub tss_UpdateInstance(ByVal InstanceID As Integer, _
                                                   ByVal InstanceName As String, _
                                                   ByVal InstanceWowHeadID As String, _
                                                   ByVal InstanceHeroicFlag As Boolean)

#End Region

#Region "Item Methods"

        Public MustOverride Function tss_GetItem(ByVal ItemID As Integer) As IDataReader
        Public MustOverride Function tss_GetItemByName(ByVal ItemName As String, _
                                                       ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetItems(ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetItemsByPage(ByVal BoardID As Integer, _
                                                        ByVal PageNumber As Integer, _
                                                        ByVal PageSize As Integer, _
                                                        ByVal SortExpression As String, _
                                                        ByVal SortDirection As String, _
                                                        ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteItem(ByVal ItemID As Integer)
        Public MustOverride Function tss_AddItem(ByVal ItemName As String, _
                                                 ByVal ItemValue As Double, _
                                                 ByVal ItemPercent As Integer, _
                                                 ByVal ItemWowHeadID As String, _
                                                 ByVal BoardID As Integer) As Integer
        Public MustOverride Sub tss_UpdateItem(ByVal ItemID As Integer, _
                                               ByVal ItemName As String, _
                                               ByVal ItemValue As Double, _
                                               ByVal ItemPercent As Integer, _
                                               ByVal ItemWowHeadID As String)

#End Region

#Region "Level Methods"

        Public MustOverride Function tss_GetLevels(ByVal GameID As Integer) As IDataReader

#End Region

#Region "Loot Methods"

        Public MustOverride Function tss_GetLoot(ByVal LootID As Integer) As IDataReader
        Public MustOverride Function tss_GetLootsByPage(ByVal RaidID As Integer, _
                                                        ByVal PageNumber As Integer, _
                                                        ByVal PageSize As Integer, _
                                                        ByVal SortExpression As String, _
                                                        ByVal SortDirection As String, _
                                                        ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Function tss_GetLootsForPlayerByPage(ByVal PlayerID As Integer, _
                                                                 ByVal PageNumber As Integer, _
                                                                 ByVal PageSize As Integer, _
                                                                 ByVal SortExpression As String, _
                                                                 ByVal SortDirection As String, _
                                                                 ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteLoot(ByVal LootID As Integer)
        Public MustOverride Function tss_AddLoot(ByVal LootValue As Double, _
                                                 ByVal RaidID As Integer, _
                                                 ByVal PlayerID As Integer, _
                                                 ByVal DropID As Integer) As Integer
        Public MustOverride Sub tss_UpdateLoot(ByVal LootID As Integer, _
                                               ByVal LootValue As Double, _
                                               ByVal RaidID As Integer, _
                                               ByVal PlayerID As Integer, _
                                               ByVal DropID As Integer)

#End Region

#Region "Mob Methods"

        Public MustOverride Function tss_GetMob(ByVal MobID As Integer) As IDataReader
        Public MustOverride Function tss_GetMobByName(ByVal MobName As String, _
                                                      ByVal InstanceID As Integer) As IDataReader
        Public MustOverride Function tss_GetMobs(ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetMobsByPage(ByVal BoardID As Integer, _
                                                       ByVal PageNumber As Integer, _
                                                       ByVal PageSize As Integer, _
                                                       ByVal SortExpression As String, _
                                                       ByVal SortDirection As String, _
                                                       ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteMob(ByVal MobID As Integer)
        Public MustOverride Function tss_AddMob(ByVal MobName As String, _
                                                ByVal MobValue As Double, _
                                                ByVal MobWowHeadID As String, _
                                                ByVal MobHeroicFlag As Boolean, _
                                                ByVal MobAttendanceFlag As Boolean, _
                                                ByVal InstanceID As Integer) As Integer
        Public MustOverride Sub tss_UpdateMob(ByVal MobID As Integer, _
                                              ByVal MobName As String, _
                                              ByVal MobValue As Double, _
                                              ByVal MobWowHeadID As String, _
                                              ByVal MobHeroicFlag As Boolean, _
                                              ByVal MobAttendanceFlag As Boolean, _
                                              ByVal InstanceID As Integer)

#End Region

#Region "Player Methods"

        Public MustOverride Function tss_GetPlayer(ByVal PlayerID As Integer) As IDataReader
        Public MustOverride Function tss_GetPlayerByName(ByVal PlayerName As String, _
                                                         ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetPlayers(ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetPlayersByClass(ByVal PlayerClass As String, _
                                                           ByVal BoardID As Integer) As IDataReader
        Public MustOverride Function tss_GetPlayersByRaid(ByVal RaidID As Integer) As IDataReader
        Public MustOverride Function tss_GetPlayersByPage(ByVal BoardID As Integer, _
                                                          ByVal PageNumber As Integer, _
                                                          ByVal PageSize As Integer, _
                                                          ByVal SortExpression As String, _
                                                          ByVal SortDirection As String, _
                                                          ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeletePlayer(ByVal PlayerID As Integer)
        Public MustOverride Function tss_AddPlayer(ByVal PlayerName As String, _
                                                   ByVal PlayerRank As String, _
                                                   ByVal PlayerClass As String, _
                                                   ByVal PlayerRace As String, _
                                                   ByVal PlayerLevel As String, _
                                                   ByVal JoinDate As DateTime, _
                                                   ByVal BoardID As Integer) As Integer
        Public MustOverride Sub tss_UpdatePlayer(ByVal PlayerID As Integer, _
                                                 ByVal PlayerName As String, _
                                                 ByVal playerRank As String, _
                                                 ByVal playerClass As String, _
                                                 ByVal playerRace As String, _
                                                 ByVal playerLevel As String, _
                                                 ByVal JoinDate As DateTime)

#End Region

#Region "Race Methods"

        Public MustOverride Function tss_GetRaces(ByVal GameID As Integer) As IDataReader

#End Region

#Region "Raid Methods"

        Public MustOverride Function tss_GetRaid(ByVal RaidID As Integer) As IDataReader
        Public MustOverride Function tss_GetRaidsByPage(ByVal BoardID As Integer, _
                                                        ByVal PageNumber As Integer, _
                                                        ByVal PageSize As Integer, _
                                                        ByVal SortExpression As String, _
                                                        ByVal SortDirection As String, _
                                                        ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Function tss_GetRaidsForPlayerByPage(ByVal PlayerID As Integer, _
                                                                 ByVal PageNumber As Integer, _
                                                                 ByVal PageSize As Integer, _
                                                                 ByVal SortExpression As String, _
                                                                 ByVal SortDirection As String, _
                                                                 ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteRaid(ByVal RaidID As Integer)
        Public MustOverride Function tss_AddRaid(ByVal RaidValue As Double, _
                                                 ByVal RaidDate As DateTime, _
                                                 ByVal RaidAttendanceFlag As Boolean, _
                                                 ByVal MobID As Integer) As Integer
        Public MustOverride Sub tss_UpdateRaid(ByVal RaidID As Integer, _
                                               ByVal RaidValue As Double, _
                                               ByVal RaidDate As DateTime, _
                                               ByVal RaidAttendanceFlag As Boolean, _
                                               ByVal MobID As Integer)

#End Region

#Region "Roster Methods"

        Public MustOverride Function tss_GetRoster(ByVal RosterID As Integer) As IDataReader
        Public MustOverride Function tss_GetRostersByPage(ByVal RaidID As Integer, _
                                                          ByVal PageNumber As Integer, _
                                                          ByVal PageSize As Integer, _
                                                          ByVal SortExpression As String, _
                                                          ByVal SortDirection As String, _
                                                          ByRef TotalPages As Integer) As IDataReader
        Public MustOverride Sub tss_DeleteRoster(ByVal RosterID As Integer)
        Public MustOverride Function tss_AddRoster(ByVal RaidID As Integer, _
                                                   ByVal PlayerID As Integer) As Integer
        Public MustOverride Sub tss_UpdateRoster(ByVal RosterID As Integer, _
                                                 ByVal RaidID As Integer, _
                                                 ByVal PlayerID As Integer)

#End Region

#Region "Systems Methods"

        Public MustOverride Function tss_GetSystems() As IDataReader

#End Region

    End Class

End Namespace